<?php

/*
* Description: Create Custom post type Agents.
* Version: 1.0
* Author: huuducvt
* Author URI: http://zonthemes.com/author/huuducvt
*/

function zonthemes_create_posttype_agents() {
  $labels = array(
    'name'               => 'Agents',
    'singular_name'      => 'Agents',
    'add_new'            => 'Add New',
    'add_new_item'       => 'Add New Agents',
    'edit_item'          => 'Edit Agents',
    'new_item'           => 'New Agents',
    'all_items'          => 'All Agents',
    'view_item'          => 'View Agents',
    'search_items'       => 'Search Agents',
    'not_found'          => 'No Agents found',
    'not_found_in_trash' => 'No Agents found in Trash',
    'parent_item_colon'  => '',
    'menu_name'          => 'Agents',
  );

  $args = array(
    'labels'             => $labels,
    'public'             => true,
    'publicly_queryable' => true,
    'show_ui'            => true,
    'show_in_menu'       => true,
    'query_var'          => true,
    'rewrite'            => array( 'slug' => 'agents' ),
    'capability_type'    => 'post',
    'has_archive'        => true,
    'hierarchical'       => false,
    'menu_position'      => null,
	'menu_icon'          => get_bloginfo("template_url").'/includes/posttypes/agents/images/agents-icon.png',
    'supports'           => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
  );

  register_post_type( 'agents', $args );
}
add_action( 'init', 'zonthemes_create_posttype_agents' );